package com.tdh.service;

import com.tdh.dao.CkCkxzMapper;
import com.tdh.pojo.CkCkdx;
import com.tdh.pojo.CkCkxz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class CkCkxzService {

    @Autowired
    private CkCkxzMapper ckxzMapper;

    /**
     * 根据查控流水号查询所有协执单位
     * @param cklsh 查控流水号
     * @return List<String>
     */
    public List<String> queryCheckedXzdw(String cklsh) {
        return ckxzMapper.queryCheckedXzdw(cklsh);
    }

    /**
     * 查询同一批次的查控对象
     * @param cklsh 查控流水号
     * @return List<CkCkdx>
     */
    public List<CkCkxz> queryBatch(String cklsh) {
        return ckxzMapper.queryBatch(cklsh);
    }

    /**
     * 批量删除
     *
     * @param ids 查控对象id 流水号
     * @return 删除行数
     */
    public int deleteCkxzes(String[] ids) {

        return ckxzMapper.deleteCkxzes(ids);
    }
}
